<!--{eval $_TPL['nosidebar']=1;}-->
<!--{template header}-->

<form id="loginform" name="loginform" action="do.php?ac=$_SCONFIG[login_action]&$url_plus&ref" method="post" >
<div class="container">
	<div class="box_s8">
		<div class="title">
			<h2>登陆</h2>
		</div>
	</div>
	<!-- start login form -->
	<div class="box_s1" style="padding:20px;">
		<div class="box_s1_in">
			<div class="box_in_left">
				<!--{if $refer }--><div class="box_notice" style="margin:10px 10px 10px 0;">您需要先登录才能进行.</div><!--{/if}-->
				<!--{if $invitearr}--> 
					<div class="box_notice" style="margin:10px 10px 10px 0;">
					<a href="space.php?$url_plus" target="_blank"><img src="<!--{avatar($invitearr[uid],small)}-->" alt="{$_SN[$invitearr[uid]]}" id="avatar" align="absmiddle" /></a>
					<a href="space.php?$url_plus" target="_blank">{$_SN[$invitearr[uid]]}</a>
					</div>
				<!--{/if}-->
				<table cellpadding="0" cellspacing="0">
					<!--{if $_SCONFIG['seccode_login']}-->
					<!--{if $_SGLOBAL['input_seccode']}-->
					<tr>
						<th width="100">&nbsp;</th>
						<td>
						请通过下面的验证后，再提交登录
						</td>
					</tr>
					<!--{/if}-->
					<!--{if $_SCONFIG['questionmode']}-->
					<tr>
						<th width="100" style="vertical-align: top;">请先回答问题</th>
						<td>
							<p><!--{eval question();}--></p>
							<input type="text" id="seccode" name="seccode" value="" tabindex="1" class="t_input"<!--{if empty($_SGLOBAL['input_seccode'])}--> onBlur="checkSeccode()"<!--{/if}--> />&nbsp;<span id="checkseccode">&nbsp;</span>
						</td>
					</tr>
					<!--{else}-->
					<tr>
						<th width="100" style="vertical-align: top;">验证码</th>
						<td>
							<script>seccode();</script>
							<p>请输入上面的4位字母或数字，看不清可<a href="javascript:updateseccode()">更换一张</a></p>
							<input type="text" id="seccode" name="seccode" value="" tabindex="1" class="t_input"<!--{if empty($_SGLOBAL['input_seccode'])}--> onBlur="checkSeccode()"<!--{/if}--> />&nbsp;<span id="checkseccode">&nbsp;</span>
						</td>
					</tr>
					<!--{/if}-->
					<!--{/if}-->
				</table>
				<div class="fs-s">邮件地址:</div>
				<input type="text" name="email" id="email" class="input" value="$memberemail"  style="width:210px;" tabindex="2" />
				<div class="fs-s pt20">密码:</div>
				<input type="password" name="password" id="password" class="input"  tabindex="3" value="$password" style="width:210px;"/>
				<input type="checkbox" id="cookietime" name="cookietime" value="315360000" $cookiecheck style="margin-bottom: -2px;"><label for="cookietime">下次自动登录</label>
				<div class="pt5">
					<a href="do.php?ac=lostpasswd">忘记密码?</a> | 
					<a href="help.php">帮助中心</a>
				</div>
				<div class="pbt10">
					<input type="submit" id="loginsubmit" name="loginsubmit" class="bbt" value="登录" />
				</div>
			</div>
		   
			<div class="box_in_right">
				<div class="plr20">
					<div class="orange fs-14 fs-s">还不是会员?</div>
					<div class="pt20"><a href="do.php?ac=$_SCONFIG[register_action]">立即加入</a>! 注册快速而且免费哦!</div> 
				</div>
			</div>
			
			<div class="clear"></div>
		</div>
	</div>
	<!-- end login form -->        
	
</div>


<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" /></form>

<script type="text/javascript">
	var lastSecCode = '';
	function checkSeccode() {
		var seccodeVerify = $('seccode').value;
		if(seccodeVerify == lastSecCode) {
			return;
		} else {
			lastSecCode = seccodeVerify;
		}
		ajaxresponse('checkseccode', 'op=checkseccode&seccode=' + (is_ie && document.charset == 'utf-8' ? encodeURIComponent(seccodeVerify) : seccodeVerify));
	}
	function ajaxresponse(objname, data) {
		var x = new Ajax('XML', objname);
		x.get('do.php?ac=$_SCONFIG[register_action]&' + data, function(s){
			var obj = $(objname);
			s = trim(s);
			if(s.indexOf('succeed') > -1) {
				obj.style.display = '';
				obj.innerHTML = '<img src="image/check_right.gif" width="13" height="13">';
				obj.className = "warning";
			} else {
				warning(obj, s);
			}
		});
	}
	function warning(obj, msg) {
		if((ton = obj.id.substr(5, obj.id.length)) != 'password2') {
			$(ton).select();
		}
		obj.style.display = '';
		obj.innerHTML = '<img src="image/check_error.gif" width="13" height="13"> &nbsp; ' + msg;
		obj.className = "warning";
	}

</script>

<!--{if $_SGLOBAL['input_seccode']}-->
<script>
$('seccode').style.background = '#FFFFCC';
$('seccode').focus();
</script>
<!--{/if}-->

<!--{template footer}-->